import {Provider} from 'react-redux';
import {render} from 'react-dom';
import {Router} from 'react-router';
import configureStore from './store';

//加载全局样式
// import 'sass/app';
import './utils/polyfill';
import history from './history';
import routes from './routes';

// `__INITIAL_STATE__` 来自服务器端渲染
const initialState = window.__INITIAL_STATE__;
const store = configureStore(initialState);

render(
    <Provider store={store}>
        <Router history={history}>
            {routes}
        </Router>
    </Provider>
    ,
    document.getElementById('container')
);